Repository navigation
Conversation
✅ Deploy Preview for netdata-docusaurus ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 5 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
No issues found across 5 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant Dev as Developer
participant Docs as Docusaurus Site
participant Theme as Mermaid Theme Wrapper
participant Renderer as Mermaid Renderer
participant Nedi as Nedi Embed
participant CDN as CDN (jsDelivr)
participant Browser as Browser
Note over Dev,Docs: Documentation Build & Runtime Flow
Dev->>Docs: Build site with Mermaid 12.1.0
Docs->>Theme: Initialize Docusaurus theme
Theme->>Renderer: Load Mermaid renderer (version 12 defaults)
Note over Docs,Theme: Client-Side Rendering
Browser->>Docs: Request page with diagrams
Docs->>Theme: Render Mermaid component
Theme->>Theme: Check color mode
alt Color mode change (e.g., dark mode persisted)
Theme->>Theme: Remount renderer with new key
Theme->>Renderer: Render diagram with fresh SVG identity
else Initial render or same color mode
Theme->>Renderer: Render diagram with existing identity
end
Renderer-->>Browser: Display rendered diagram
Note over Nedi,CDN: Ask Nedi Asset Loading
Browser->>Nedi: Load Ask Nedi interface
Nedi->>CDN: Fetch markdown-it@15.0.2 (integrity-checked)
CDN-->>Nedi: Return markdown-it script
Nedi->>CDN: Fetch mermaid@12.1.0 (integrity-checked)
CDN-->>Nedi: Return Mermaid 12.1.0
Nedi->>CDN: Fetch @viz-js/viz@3.31.0 (integrity-checked)
CDN-->>Nedi: Return viz script
Note over Nedi: Render synthetic Markdown/Link, Mermaid, Graphviz
Nedi->>Renderer: Render diagrams client-side
Renderer-->>Browser: Display diagrams in Nedi
Note over Docs,Nedi: Browser Requirements
Note over Docs,Nedi: ES2024-capable browser required (Safari 17.4+)
ktsaou
marked this pull request as draft
October 9, 2026 09:36
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update Learn documentation and Nedi to Mermaid 12.1.0 with the approved version 12 rendering defaults. Keep the companion Markdown-it 15.0.2 and Viz 3.31.0 updates and recomputed SHA-384 pins. Docusaurus and the root now resolve one supported Mermaid/parser graph; no lodash override or incompatible resolution is introduced.
Actual browser qualification found that persisted dark mode left one collapsed Parents diagram blank. A small Docusaurus theme wrapper remounts the original renderer on color-mode changes, giving it a fresh SVG identity while preserving its configuration, error boundary and props. This is a checked compatibility adapter, without a copied renderer or custom layout.
Validation: forced frozen Yarn install; complete 2,032-page publication gates; all 490 Vitest tests (one existing skip) and 99 Node tests. After the adapter, the changed build and test command passed again. All twelve actual documentation cases (three routes, both themes, desktop/mobile) rendered every diagram with no horizontal overflow. Persisted dark reload, theme switching and client navigation passed. The real public Nedi embed loaded the integrity-checked assets and rendered a synthetic client-only Markdown/link, Mermaid and Graphviz response; desktop/mobile passed without a model request or network write.
This replacement incorporates the intent of #3093 and supersedes its unsupported lodash exception and the overlapping Viz-only #3073 proposal. Existing loader, Markdown adapter, embed endpoints/cache parameters and SEO policy remain unchanged. Modern ES2024 browsers, including Safari 17.4 or newer, are required.
Summary by cubic
Updates documentation and Nedi diagrams to
mermaid12.1.0 with the approved version 12 rendering defaults, and bumps the companionmarkdown-it15.0.2 and@viz-js/viz3.31.0 with recomputed SHA-384 pins. Docusaurus and the Nedi embed now resolve one supported Mermaid/parser graph.A small Docusaurus theme wrapper remounts the upstream renderer on color-mode changes, fixing a blank diagram in persisted dark mode while preserving configuration, error boundary, and props. Rendering now requires an ES2024-capable browser, including Safari 17.4 or newer. The README documents the supported browser range and notes that the local lock and the CDN asset share the same version but update independently.
Written for commit f71b81d. Summary will update on new commits.